Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate tz locations against root #5759

Merged
merged 4 commits into from
Nov 3, 2024

Conversation

robertbastian
Copy link
Member

@robertbastian robertbastian commented Oct 31, 2024

A lot of location names are the same in many languages.

For exemplar cities we have root data, however for territories we don't. For territories I'm resolving the und name by using a Latin-script endonym (i.e. for region XY, resolve und-Latn-XY), and if that fails, just use English (not perfect, but it's better than the raw region code for both display purposes and deduplication).

@robertbastian robertbastian changed the title Locations Deduplicate tz locations against root Oct 31, 2024
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had mixed feelings about this, since mixing data from multiple CLDR versions could cause problems. But, I think the benefits outweigh the drawbacks. See #5763.

Comment on lines +550 to +551
locations_root:
<R::ZoneLocations as DateTimeNamesHolderTrait<tz::LocationsV1Marker>>::Container<()>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought: This makes DateTimeFormatter<YMDHMSZ> a little bit bigger in stack size.

time_zone/locations@1, <total>, 1979623B, 1951879B, 204 unique payloads
time_zone/locations@1, af, 8161B, 8025B, 1cb532d1ca53b263
time_zone/locations@1, ak, 8179B, 8043B, 61a5ec381137eb44
time_zone/locations@1, <total>, 1435127B, 1407337B, 204 unique payloads
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Praise: 1'979'623B to 1'435'127B is a big enough improvement that I'm happy landing this despite my other comments.

@robertbastian robertbastian merged commit 983ce33 into unicode-org:main Nov 3, 2024
28 checks passed
@robertbastian robertbastian deleted the locations branch November 3, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants